package com.xiangban.feign.fallback;

import com.xiangban.feign.CommonMemberFeign;
import com.xiangban.model.res.ApiResult;
import com.xiangban.model.vo.TUserTicket;
import feign.hystrix.FallbackFactory;

/**
 * @Author ly
 * @date 2021/12/27 14:56
 */
public class CommonMemberFallback implements FallbackFactory<CommonMemberFeign> {

    @Override
    public CommonMemberFeign create(Throwable cause) {
        return new CommonMemberFeign() {
            @Override
            public ApiResult<Object> getUserInfo() {
                return ApiResult.newError("---->>>>>>getUserInfo错误");
            }

            @Override
            public ApiResult<Object> convertTicket(TUserTicket tUserTicket) {
                return ApiResult.newError("------>>>>>>>convertTicket错误");
            }
        };
    }
}
